package com.bmps.springcloud.insuredmicroservice.service.underwrite.strategy.riskamount;

import com.bmps.springcloud.insuredmicroservice.model.accept.medium.PolicyRiskInfoModel;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

/**
 * description:
 *
 * @author jackdaw
 * @date 2020-06-08 0:29
 */
@Component
public class Hct026Strategy implements InsuranceRiskAmountStrategy {
    @Override
    public BigDecimal getRiskAmount(PolicyRiskInfoModel policyRiskInfoModel, boolean isCurrent, Object object) {

        return policyRiskInfoModel.getSumSinglePayIllnessAmnt() == null ? BigDecimal.valueOf(0) : policyRiskInfoModel.getSumSinglePayIllnessAmnt();
    }
}
